/*
 * @Author: fisher
 * @Date: 2024-03-14 11:33:49
 * @LastEditors: fisher luthor-li@qq.com
 * @LastEditTime: 2024-07-22 17:42:37
 * @FilePath: \allfront\src\utils\fpstream\modules\Marker\index.js
 * @Description:
 */
export default class {
  constructor(send2Ue, listen2Ue) {
    this.send2Ue = send2Ue;
    this.listen2Ue = listen2Ue;
    this.baseCmd = "/PoiManager";
  }
  add(data = {}, cb) {
    this.listen2Ue(`${this.baseCmd}/CreatePoi_Callback`, cb);
    this.send2Ue(`${this.baseCmd}/CreatePoi`, data);
  }
  deleteById(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/DestroyById`, data, cb);
  }
  deleteByGroupName(data, cb) {
    this.send2Ue(
      `${this.baseCmd}/DestroyByGroup`,
      {
        Group: data,
      },
      cb
    );
  }
  deleteAll(data = {}, cb) {
    this.send2Ue(`${this.baseCmd}/DestroyAllPoi`, data, cb);
  }
}
